// import { Model } from "sequelize-typescript";

/**
 * @description 统一处理分页格式
 * @param {*} data 列表数据
 * @param {number} currentPage 当前页
 * @param {number} pageSize 每页数量
 * @param {number} total 总数
 */
 function paginate(data: any = [], currentPage: number = 1, pageSize: number = 100, total: number = 0) {
    return {
      data,
      currentPage,
      pageSize,
      total,
      totalPage: Math.ceil(total / pageSize)
    }
  }
  
  export default paginate
  